tts_voice object
This method will speak a given string, interrupting all other queued strings.
bool speak_interrupt(string text)
Parameters:
text
The text to speak.
Return value:
true on success, false on failure.
Remarks:
All previous text queued by the speak or speak_interrupt method will be cleared, and the new text spoken straight away.
Example:
// Add various text to a buffer and interrupt it.
tts_voice speech;
void main()
{
speech.speak("This is text1.");
speech.speak("This is text2.");
speech.speak("This is text3.");
wait(300);
speech.speak_interrupt("This is text4 interrupting all previous announcements.");
while(speech.speaking)
{
wait(5);
}
}